package com.clj.cloud.nacos_skywalking_customer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.clj.cloud.nacos_skywalking_customer.service.HelloworldService;

@RestController
public class HelloworldController {
	
	@Autowired
	 HelloworldService helloworldService;

    

    @GetMapping(value = "/sayHello")
    public String sayHello(@RequestParam(value = "name") String name) {
        return helloworldService.sayHello(name);
    }

    @GetMapping(value = "/findByName")
    public String findByName(@RequestParam(value = "name") String name) {
        return helloworldService.findByName(name);
    }

    @GetMapping(value = "/test")
    public String test() {
        throw new RuntimeException("test");
    }
}
